home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / GRAPHICS / RAYTRACING / POVRAY-2.2 / SCENES / level1 / LASER < prev    next >
Text File  |  1993-09-28  |  3KB  |  126 lines

  1. // Persistence of Vision Raytracer Version 2.0
  2. //A couple of tricks with spotlights and wood texture here.  Read the
  3. //comments.  By Dan Farmer.
  4.  
  5.  
  6. #include "colors.inc"
  7. #include "shapes.inc"
  8.  
  9. camera {
  10.    location  <-8, 3, -14>
  11.    direction <0, 0, 1>
  12.    up        <0, 1, 0>
  13.    right   <4/3, 0, 0>
  14.    look_at   <0, 0, 0>
  15. }
  16.  
  17. // Overhead spotlight, shining "backwards"
  18. light_source {
  19.    <0, 50, -1> color LightGray
  20.    spotlight
  21.    point_at <0, 0, 8>
  22.    tightness 50
  23.    radius 50
  24.    falloff 100
  25. }
  26.  
  27. // Ground plane
  28. plane { y, -1
  29.    pigment {White}
  30.    finish {
  31.       ambient 0.3
  32.       diffuse 0.7
  33.       specular 0.5  roughness 0.05
  34.    }
  35. }
  36.  
  37. // Three spotlights positioned in front of three cylinders.  These could
  38. // be put into composites if you wanted to really do it right.  Each light
  39. // is associated with a cylinder.
  40. //----------
  41. // Red spotlight, goes with  left cylinder
  42. light_source {
  43.    <-3, -0.5, -2>  
  44.    color Red
  45.    spotlight
  46.    point_at <-3, -1, -10>
  47.    tightness 10
  48.    radius 100
  49.    falloff 250
  50. }
  51.  
  52. // Green spotlight, goes with center cylinder
  53. light_source {
  54.    <0, -0.5, -2>
  55.    color Green
  56.    spotlight
  57.    point_at <0, -1, -10>
  58.    tightness 10
  59.    radius 100
  60.    falloff 250
  61. }
  62.  
  63. // Blue spotlight, goes with right cylinder
  64. light_source {
  65.    <3, -0.5, -2> color Blue
  66.    spotlight
  67.    point_at <3, -1, -10>
  68.    tightness 10
  69.    radius 100
  70.    falloff 250
  71. }
  72.  
  73. // Set default textures for shapes to come
  74. default {
  75.    finish {
  76.       ambient 0.5     // Unusually high ambient setting.
  77.       diffuse 0.5     // Unusually low diffuse setting.
  78.       refraction 0.75 // Don't really need an IOR value this time.
  79.       reflection 0.15
  80.       specular 0.25 roughness 0.001
  81.    }
  82. }
  83.  
  84. // Red cylinder on the left.  Goes with red spotlight.
  85. object { Disk_Z
  86.    pigment {
  87.       wood
  88.       turbulence 0  // I want concentric rings,  not wood.
  89.       // colormap from opaque red to "clear red"
  90.       color_map {[0, 1  color Red filter 0 color Red filter 1] }
  91.       scale <2, 2, 1>
  92.    }
  93.  
  94.    scale <1, 1, 6>        // Scale texture with the object now.
  95.    translate <-3, 0, 4>   // Move it to its final restingplace
  96. }
  97.  
  98. // Green cylinder in the center.  Goes with green spotlight.
  99. object { Disk_Z  
  100.    pigment {
  101.       wood
  102.       turbulence 0  // I want concentric rings,  not wood.
  103.       // colormap from opaque green to "clear green"
  104.       color_map {[0, 1  color Green filter 0 color Green filter 1] }
  105.       scale <2, 2, 1>
  106.    }
  107.  
  108.    scale <1, 1, 6>
  109.    translate <0, 0, 4>
  110. }
  111.  
  112. // Blue cylinder on the right.  Goes with blue spotlight, right?
  113. object { Disk_Z
  114.    pigment {
  115.       wood
  116.       turbulence 0  // I want concentric rings,  not wood.
  117.       // colormap from opaque blue to "clear blue"
  118.       color_map {[0, 1  color Blue filter 0 color Blue filter 1] }
  119.       scale <2, 2, 1>
  120.    }
  121.  
  122.    scale <1, 1, 6>
  123.    translate <3, 0, 4>
  124. }
  125.  
  126.